home *** CD-ROM | disk | FTP | other *** search
- # Texas Metronet PPP and SLIP script
- # Copyright 1995 Quarterdeck Corporation
- # 5-9-95 CEL
-
- #define the variables we will need
-
- STRING username
- STRING password
- STRING framing
- STRING IPAddress
-
- # uncomment for debugging
- # TRACE ON
-
- SetTimeout 60
-
-
- # Get username from access method
- CfgGetValue "Username" username
-
- # if the Username field is empty, prompt the user for it.
- IF result = 0 THEN
- GetInput "Enter your user name" username
- IF result = 0 THEN
- PRINT "Warning, no username entered"
- ELSE
- PRINT "Username set to:"; username
- ENDIF
- ENDIF
-
- # get password from access method
- CfgGetValue "Password" password
-
- # if the Password field is empty, prompt the user for it.
- IF result = 0 THEN
- GetPassword "Enter your password" password
- IF result = 0 THEN
- PRINT "Warning, no password entered"
- ELSE
- PRINT "Password set."
- ENDIF
- ENDIF
-
- # get framing layer (MPPPP, MPSLIP)
- # abort with an error if we can't read the Framing setting
- CfgGetValue "Framing" framing
- IF result = 0 THEN
- ABORT "Can't read 'Framing' setting from qdeck.ini"
- ENDIF
-
- CommWaitFor "login:"
-
- # The character before the user name indicates the type of connection.
- IF framing = "MPPPP" THEN
- CommSend "P"
- ENDIF
- IF framing = "MPSLIP" THEN
- CommSend "S"
- ENDIF
-
- CommSend username
- CommSend "%r"
-
- CommWaitFor "Password:"
- CommSend password
- CommSend "%r"
-
- # if SLIP, we need to get the IP address
- # wait for string that precedes IP address then get IP address
- IF framing = "MPSLIP" THEN
- PRINT "%rGetting IP address for SLIP"
-
- CommWaitFor ") to"
- CommReadIPAddr IPAddress
- CfgSetValue "IPAddress" IPaddress
- PRINT "%rIP Address set to:"; IPAddress
- ENDIF
-
- END
-